﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    public sealed class Camera : Behaviour
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void CopyFrom(Camera other);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void DoClear();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern float GetScreenHeight();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern float GetScreenWidth();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_ResetAspect(Camera self);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_ResetProjectionMatrix(Camera self);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_ResetReplacementShader(Camera self);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern void INTERNAL_CALL_ResetWorldToCameraMatrix(Camera self);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Ray INTERNAL_CALL_ScreenPointToRay(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Vector3 INTERNAL_CALL_ScreenToViewportPoint(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Vector3 INTERNAL_CALL_ScreenToWorldPoint(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Ray INTERNAL_CALL_ViewportPointToRay(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Vector3 INTERNAL_CALL_ViewportToScreenPoint(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Vector3 INTERNAL_CALL_ViewportToWorldPoint(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Vector3 INTERNAL_CALL_WorldToScreenPoint(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private static extern Vector3 INTERNAL_CALL_WorldToViewportPoint(Camera self, ref Vector3 position);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_backgroundColor(out Color value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_cameraToWorldMatrix(out Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_pixelRect(out Rect value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_projectionMatrix(out Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_rect(out Rect value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_velocity(out Vector3 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_get_worldToCameraMatrix(out Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern bool Internal_RenderToCubemapRT(RenderTexture cubemap, int faceMask);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern bool Internal_RenderToCubemapTexture(Cubemap cubemap, int faceMask);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_backgroundColor(ref Color value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_pixelRect(ref Rect value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_projectionMatrix(ref Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_rect(ref Rect value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void INTERNAL_set_worldToCameraMatrix(ref Matrix4x4 value);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal extern bool IsFiltered(GameObject go);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void Render();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void RenderDontRestore();
        public bool RenderToCubemap(Cubemap cubemap)
        {
            int faceMask = 0x3f;
            return this.RenderToCubemap(cubemap, faceMask);
        }

        public bool RenderToCubemap(RenderTexture cubemap)
        {
            int faceMask = 0x3f;
            return this.RenderToCubemap(cubemap, faceMask);
        }

        public bool RenderToCubemap(Cubemap cubemap, int faceMask)
        {
            return this.Internal_RenderToCubemapTexture(cubemap, faceMask);
        }

        public bool RenderToCubemap(RenderTexture cubemap, int faceMask)
        {
            return this.Internal_RenderToCubemapRT(cubemap, faceMask);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void RenderWithShader(Shader shader, string replacementTag);
        public void ResetAspect()
        {
            INTERNAL_CALL_ResetAspect(this);
        }

        public void ResetProjectionMatrix()
        {
            INTERNAL_CALL_ResetProjectionMatrix(this);
        }

        public void ResetReplacementShader()
        {
            INTERNAL_CALL_ResetReplacementShader(this);
        }

        public void ResetWorldToCameraMatrix()
        {
            INTERNAL_CALL_ResetWorldToCameraMatrix(this);
        }

        public Ray ScreenPointToRay(Vector3 position)
        {
            return INTERNAL_CALL_ScreenPointToRay(this, ref position);
        }

        public Vector3 ScreenToViewportPoint(Vector3 position)
        {
            return INTERNAL_CALL_ScreenToViewportPoint(this, ref position);
        }

        public Vector3 ScreenToWorldPoint(Vector3 position)
        {
            return INTERNAL_CALL_ScreenToWorldPoint(this, ref position);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void SetReplacementShader(Shader shader, string replacementTag);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern void SetupCurrent(Camera cur);
        public Ray ViewportPointToRay(Vector3 position)
        {
            return INTERNAL_CALL_ViewportPointToRay(this, ref position);
        }

        public Vector3 ViewportToScreenPoint(Vector3 position)
        {
            return INTERNAL_CALL_ViewportToScreenPoint(this, ref position);
        }

        public Vector3 ViewportToWorldPoint(Vector3 position)
        {
            return INTERNAL_CALL_ViewportToWorldPoint(this, ref position);
        }

        public Vector3 WorldToScreenPoint(Vector3 position)
        {
            return INTERNAL_CALL_WorldToScreenPoint(this, ref position);
        }

        public Vector3 WorldToViewportPoint(Vector3 position)
        {
            return INTERNAL_CALL_WorldToViewportPoint(this, ref position);
        }

        public RenderingPath actualRenderingPath
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
        }

        public static Camera[] allCameras
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
        }

        public float aspect
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public Color backgroundColor
        {
            get
            {
                Color color;
                this.INTERNAL_get_backgroundColor(out color);
                return color;
            }
            set
            {
                this.INTERNAL_set_backgroundColor(ref value);
            }
        }

        public Matrix4x4 cameraToWorldMatrix
        {
            get
            {
                Matrix4x4 matrixx;
                this.INTERNAL_get_cameraToWorldMatrix(out matrixx);
                return matrixx;
            }
        }

        public CameraClearFlags clearFlags
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get;
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            set;
        }

        public int cullingMask { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static Camera current { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public float depth { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public DepthTextureMode depthTextureMode { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public float far
        {
            get
            {
                return this.farClipPlane;
            }
            set
            {
                this.farClipPlane = value;
            }
        }

        public float farClipPlane { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public float fieldOfView { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public float fov
        {
            get
            {
                return this.fieldOfView;
            }
            set
            {
                this.fieldOfView = value;
            }
        }

        public bool hdr { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool isOrthoGraphic
        {
            get
            {
                return this.orthographic;
            }
            set
            {
                this.orthographic = value;
            }
        }

        public float[] layerCullDistances { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool layerCullSpherical { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public static Camera main { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public static Camera mainCamera
        {
            get
            {
                return main;
            }
        }

        public float near
        {
            get
            {
                return this.nearClipPlane;
            }
            set
            {
                this.nearClipPlane = value;
            }
        }

        public float nearClipPlane { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool orthographic { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public float orthographicSize { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public float pixelHeight { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public Rect pixelRect
        {
            get
            {
                Rect rect;
                this.INTERNAL_get_pixelRect(out rect);
                return rect;
            }
            set
            {
                this.INTERNAL_set_pixelRect(ref value);
            }
        }

        public float pixelWidth { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public Matrix4x4 projectionMatrix
        {
            get
            {
                Matrix4x4 matrixx;
                this.INTERNAL_get_projectionMatrix(out matrixx);
                return matrixx;
            }
            set
            {
                this.INTERNAL_set_projectionMatrix(ref value);
            }
        }

        public Rect rect
        {
            get
            {
                Rect rect;
                this.INTERNAL_get_rect(out rect);
                return rect;
            }
            set
            {
                this.INTERNAL_set_rect(ref value);
            }
        }

        public RenderingPath renderingPath { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public RenderTexture targetTexture { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public TransparencySortMode transparencySortMode { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public bool useOcclusionCulling { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

        public Vector3 velocity
        {
            get
            {
                Vector3 vector;
                this.INTERNAL_get_velocity(out vector);
                return vector;
            }
        }

        public Matrix4x4 worldToCameraMatrix
        {
            get
            {
                Matrix4x4 matrixx;
                this.INTERNAL_get_worldToCameraMatrix(out matrixx);
                return matrixx;
            }
            set
            {
                this.INTERNAL_set_worldToCameraMatrix(ref value);
            }
        }
    }
}

